<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Echart-test</title>
  <style>
    .box {
      width: 300px;
      height: 300px;
      background-color: aqua;
    }
  </style>
</head>
<body>
  <div class="box"></div>
  <script src="./echarts.min.js"></script>
  <script>
    // 初始化实例对象，参数是DOM容器
    var myChart = echarts.init(document.querySelector('.box'));
    var option = {
      xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
          type: 'value'
      },
      series: [{
          data: [820, 932, 901, 934, 1290, 1330, 1320],
          type: 'line'
      }]
    };
    myChart.setOption(option);
  </script>
</body>

</html>